package IA;

import java.util.*;
import Jplay.TileInfo;
import MotorGrafico.Indice;

public class Node {
	
	private TileInfo tile;
	private Indice indice;
	private ArrayList<Node> children;
	
	
	public Node(TileInfo tile,Indice idx){
		this.tile = tile;
		this.indice = idx;
		this.children = new ArrayList<Node>();
	}
	
	public int getTileId(){
		return tile.id;
	}
	
	public TileInfo getTile(){
		return this.tile;
	}
	
	public Indice getIndex(){
		return this.indice;
	}
	
	public boolean hasChildren(){
		return this.children.size() > 0;
	}
	
	public void setChild(Node child){
		this.children.add(child);
	}
	
	public ArrayList<Node> getChildren(){
		return this.children;
	}
}
